class JyArea extends React.Component{
    constructor() {
        super();
        this.state = {
            contentList:[],
            pageIndex:1,
            pageSum:1
        }
    }
    async getWeibo(pageI=1){
        // 获得微博信息
        const {contentList,pageIndex,pageSum} = await this.$axios.get("/weibo",{
            params:{
                pageIndex:pageI
            }
        })
         this.setState({
             contentList,
             pageIndex,
             pageSum
        })
    }
    componentDidMount(){
        this.getWeibo();
    }
    render(){
        return (
            <div className="jyArea">
                <TakeComment getWeibo={this.getWeibo.bind(this)}></TakeComment>
                {/*<CommentOn getWeibo={this.getWeibo.bind(this)} pageIndex={this.state.pageIndex} pageSum={this.state.pageSum} contentList={this.state.contentList} />*/}
                {/*<CommentOn getWeibo={this.getWeibo.bind(this)} {...this.state} />*/}
                <CommentOn {...{
                    ...this.state,
                    ...{
                        getWeibo:this.getWeibo.bind(this)
                    }
                }} />
            </div>
        )
    }
}